﻿using System.Data.SqlClient;

namespace OneCard.Face8280Module.Config
{
    public class DBConnectionConfig
    {
        public string DBName { get; set; }

        public string DBAddr { get; set; }
        public string User { get; set; }
        public string Password { get; set; }


        public string GetConnectionString()
        {
            //Data Source=DESKTOP-T2D6ILD;
            //Initial Catalog=SqlSugarCustomerDB;
            //Persist Security Info=True;
            //User ID=sa;
            //Password=sa123
            SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
            builder.InitialCatalog = DBName;
            builder.DataSource = DBAddr;
            builder.UserID = User;
            builder.Password = Password;
            builder.PersistSecurityInfo = true;
            builder.Pooling = true;


            return builder.ToString();
        }


    }
}
